package com.umgsai.thread.thread01;

public class CountOperate extends Thread {

	public CountOperate(){
		System.out.println("CountOperate begin...");
		System.out.println("Thread.currentThread().getName()=" + Thread.currentThread().getName());//main
		System.out.println("this.getName()=" + this.getName());//Thread-0
		System.out.println("CountOperate end...");
	}
	
	@Override
	public void run() {
		System.out.println("run begin...");
		System.out.println("Thread.currentThread().getName()=" + Thread.currentThread().getName());//test
		System.out.println("this.getName()=" + this.getName());//Thread-0
		System.out.println("run end...");
	}
	
	public static void main(String[] args) {
		CountOperate countOperate = new CountOperate();
		Thread thread = new Thread(countOperate);
		thread.setName("test");
		thread.start();
	}
}
